package com.telit.firecommand.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.telit.upms.pojo.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 用户表
 * </p>
 *
 * @author yuzhanxiang
 * @since 2022-10-08
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(value = "SysUser对象", description = "用户表")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("所属客户id")
    private Long customerId;

    @ApiModelProperty("所属部门id")
    private Long deptId;

    @ApiModelProperty("区域id")
    private Long districtId;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("真实姓名")
    private String realName;

    @ApiModelProperty("用户密码")
    private String passWord;

    @ApiModelProperty("性别(0-男,1-女)")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private GenderEnum gender;

    @ApiModelProperty("生日")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Long birthday;

    @ApiModelProperty("身份证号码")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String idCard;

    @ApiModelProperty("政治面貌")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private PolicitalEnum politicalStatus;

    @ApiModelProperty("办公室电话")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String officePhone;

    @ApiModelProperty("手机号码")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String mobile;

    @ApiModelProperty("邮箱")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String email;

    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String qq;

    @ApiModelProperty("微信号")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String wechat;

    @ApiModelProperty("简介备注")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String remark;

    @ApiModelProperty("头像链接")
    private String icon;

    @ApiModelProperty("是否锁定(0-锁定,1-未锁定)")
    private UserLockEnum isLock;

    @ApiModelProperty("所属责任区(暂无用)")
    private Long responsibleZone;

    @ApiModelProperty("岗位(数据字典)")
    private Integer position;

    @ApiModelProperty("岗位分类(数据字典)")
    private Integer positionRank;

    @ApiModelProperty("岗位层级(数据字典)")
    private Integer positionLevel;

    @ApiModelProperty("是否贫困户(0-非贫困户 1-是贫困户)")
    private Integer poorHousehold;

    @ApiModelProperty("通讯录展示(0-不展示 1-展示)")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private ShowEnum isShow;

    @ApiModelProperty("在线状态(0-不在线 1-在线)")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private OnlineStatusEnum onlineStatus;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("创建人")
    private Long createBy;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("更新人")
    private Long updateBy;

    @ApiModelProperty("删除标识（1-正常,0-删除）")
    @TableLogic
    private Integer isDeleted;

    @ApiModelProperty("用户籍贯")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String nativePlace;

    @ApiModelProperty("用户性质")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer jobNature;

    @ApiModelProperty("用户登录时间")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("职务")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String duty;

    @ApiModelProperty("是否首次登录(0-否,1-是)")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer isFirstLogin;

    @ApiModelProperty("备用字段1")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String remarkOne;

    @ApiModelProperty("备用字段2")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String remarkTwo;

    @ApiModelProperty("备用字段3")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String remarkThree;

    @ApiModelProperty("v1.3.0-头像地址")
    //@TableField(updateStrategy = FieldStrategy.IGNORED)
    private String avatar;

    @ApiModelProperty("v1.3.0-联系地址")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String address;


    // ---------------业务系统新增字段-------------
    @ApiModelProperty("经度")
    private String longitude;

    @ApiModelProperty("纬度")
    private String latitude;

    @ApiModelProperty("在线状态(0-不在线 1-在线)")
    private Integer userOnlineStatus;

    @ApiModelProperty("行政区划编码")
    private String districtCode;

}
